package com.example.test_app.bean;


import android.os.Parcel;
import android.os.Parcelable;

import com.google.gson.annotations.SerializedName;


import java.util.ArrayList;
import java.util.List;

/**
 * 用户信息
 */
public class UserInfo implements Parcelable {

    /**
     * uid : 5240709
     * nickname : 疾风满一刀_1
     * sign : 一个伟大的签名正在酝酿中
     * avatar : https://newstatic.qifanzhibo.com/default/avatars/107.jpg
     * sex : 1
     * fans : 0
     * concern : 0
     * level : 1
     * coin : 0
     * shell : 0
     * cellphone : 5240709
     * xanchor : 0
     * user_type : 2
     * authStatus : 4
     * authName : 已认证
     * familyname :
     * noBaseSalary : true
     * invester : []
     * found : {"switch":false,"icon":"https://newstatic.qifanzhibo.com/default/user-avatar.png","title":"七果游戏","desc":"上古神器","img":"https://newstatic.qifanzhibo.com/default/user-avatar.png","url":"http://www.qiyuzhibo.com"}
     * guard_tag :
     * isUidBindWeiXin : true
     * vip : {"level":"","img":"","onimg":""}
     * onuse :
     * medals : {"img":"","onimg":""}
     * is_tourist   /是否游客 1是 0不是
     */

    private String uid;
    private String nickname;
    private String sign;
    private String avatar;
    private String sex;
    private String fans;
    private String concern;
    private int level;
    private String coin;
    private String shell;
    private String cellphone;
    private String xanchor;
    private int user_type; //用户类型 0 普通 , 1 会员 , 2会长 ,3管理员
    private String authStatus;// 主播状态 1、不通过,2、审核中,3、未提交审核信息,4、已通过
    private String authName;//实名认证
    private String familyname;
    private boolean noBaseSalary;
    private FoundBean found;
    private String guard_tag;
    private boolean isGetHonorCoin;
    private boolean isUidBindWeiXin;
    private VipBean vip;
    private String onuse;
    private MedalsBean medals;
    private ArrayList<String> invester;
    private String adorable; //1未充值 ，2 已充值，3 萌新
    private String showGrowfund; //显示成长基金, ‘’不显示
    private boolean isCompleteGrowfund; //成长基金红点
    private String groupFundUrl;// 	成长基金web地址
    private String status;    // 	0不可领取,1可领取,2已领取
    private boolean isMember;
    private boolean is_good_number;
    private String inviteUrl; // 直播间邀请好友活动的链接
    private String memberImg; // 会员图片 isMember true图片用这里的，不用本地的，因为会员icon可能是体验会员

    private boolean has_Box = false; // 是否开启保险箱
    private boolean isOrgLeader = false; //是否是公会长
    private boolean isFamLeader = false; // 是否是家族长
    private boolean is_signer = false; // 是否是签约主播
    private int is_tourist; //是否游客 1是 0不是
    private int freeAddressNumber;
    private String address;
    private String online_status = "";//V570, 新增用户隐身或在线字段 online_status 	1在线,0在线隐身
    private int isShowShop;//v580 	是否展示商店	1展示 0隐藏
    private String anchorStatus = "0";//是否通过直播监察的主播 1是通过直播检查的主播
    private String init_time; //  新增用户注册时间
    public UserInfo(){}
    protected UserInfo(Parcel in) {
        uid = in.readString();
        nickname = in.readString();
        sign = in.readString();
        avatar = in.readString();
        sex = in.readString();
        fans = in.readString();
        concern = in.readString();
        level = in.readInt();
        coin = in.readString();
        shell = in.readString();
        cellphone = in.readString();
        xanchor = in.readString();
        user_type = in.readInt();
        authStatus = in.readString();
        authName = in.readString();
        familyname = in.readString();
        noBaseSalary = in.readByte() != 0;
        found = in.readParcelable(FoundBean.class.getClassLoader());
        guard_tag = in.readString();
        isGetHonorCoin = in.readByte() != 0;
        isUidBindWeiXin = in.readByte() != 0;
        vip = in.readParcelable(VipBean.class.getClassLoader());
        onuse = in.readString();
        medals = in.readParcelable(MedalsBean.class.getClassLoader());
        invester = in.createStringArrayList();
        adorable = in.readString();
        showGrowfund = in.readString();
        isCompleteGrowfund = in.readByte() != 0;
        groupFundUrl = in.readString();
        status = in.readString();
        isMember = in.readByte() != 0;
        is_good_number = in.readByte() != 0;
        inviteUrl = in.readString();
        memberImg = in.readString();
        online_status = in.readString();
        has_Box = in.readByte() != 0;
        isOrgLeader = in.readByte() != 0;
        isFamLeader = in.readByte() != 0;
        is_signer = in.readByte() != 0;
        is_tourist = in.readInt();
        freeAddressNumber = in.readInt();
        address = in.readString();
        isShowShop = in.readInt();
        anchorStatus = in.readString();
        init_time = in.readString();
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(uid);
        dest.writeString(nickname);
        dest.writeString(sign);
        dest.writeString(avatar);
        dest.writeString(sex);
        dest.writeString(fans);
        dest.writeString(concern);
        dest.writeInt(level);
        dest.writeString(coin);
        dest.writeString(shell);
        dest.writeString(cellphone);
        dest.writeString(xanchor);
        dest.writeInt(user_type);
        dest.writeString(authStatus);
        dest.writeString(authName);
        dest.writeString(familyname);
        dest.writeByte((byte) (noBaseSalary ? 1 : 0));
        dest.writeParcelable(found, flags);
        dest.writeString(guard_tag);
        dest.writeByte((byte) (isGetHonorCoin ? 1 : 0));
        dest.writeByte((byte) (isUidBindWeiXin ? 1 : 0));
        dest.writeParcelable(vip, flags);
        dest.writeString(onuse);
        dest.writeParcelable(medals, flags);
        dest.writeStringList(invester);
        dest.writeString(adorable);
        dest.writeString(showGrowfund);
        dest.writeByte((byte) (isCompleteGrowfund ? 1 : 0));
        dest.writeString(groupFundUrl);
        dest.writeString(status);
        dest.writeByte((byte) (isMember ? 1 : 0));
        dest.writeByte((byte) (is_good_number ? 1 : 0));
        dest.writeString(inviteUrl);
        dest.writeString(memberImg);
        dest.writeString(online_status);
        dest.writeByte((byte) (has_Box ? 1 : 0));
        dest.writeByte((byte) (isOrgLeader ? 1 : 0));
        dest.writeByte((byte) (isFamLeader ? 1 : 0));
        dest.writeByte((byte) (is_signer ? 1 : 0));
        dest.writeInt(is_tourist);
        dest.writeInt(freeAddressNumber);
        dest.writeString(address);
        dest.writeInt(isShowShop);
        dest.writeString(anchorStatus);
        dest.writeString(init_time);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<UserInfo> CREATOR = new Creator<UserInfo>() {
        @Override
        public UserInfo createFromParcel(Parcel in) {
            return new UserInfo(in);
        }

        @Override
        public UserInfo[] newArray(int size) {
            return new UserInfo[size];
        }
    };

    public String getInviteUrl() {
        return inviteUrl;
    }

    public void setInviteUrl(String inviteUrl) {
        this.inviteUrl = inviteUrl;
    }



    public boolean isIs_signer() {
        return is_signer;
    }

    public void setIs_signer(boolean is_signer) {
        this.is_signer = is_signer;
    }

    public int getIs_tourist() {
        return is_tourist;
    }

    public void setIs_tourist(int is_tourist) {
        this.is_tourist = is_tourist;
    }

    public boolean isHas_Box() {
        return has_Box;
    }

    public void setHas_Box(boolean has_Box) {
        this.has_Box = has_Box;
    }

    public boolean isOrgLeader() {
        return isOrgLeader;
    }

    public void setOrgLeader(boolean orgLeader) {
        isOrgLeader = orgLeader;
    }

    public boolean isFamLeader() {
        return isFamLeader;
    }

    public void setFamLeader(boolean famLeader) {
        isFamLeader = famLeader;
    }

    public String getMemberImg() {
        return memberImg;
    }

    public void setMemberImg(String memberImg) {
        this.memberImg = memberImg;
    }

    public boolean isIs_good_number() {
        return is_good_number;
    }

    public void setIs_good_number(boolean is_good_number) {
        this.is_good_number = is_good_number;
    }

    public boolean isGetHonorCoin() {
        return isGetHonorCoin;
    }

    public void setGetHonorCoin(boolean getHonorCoin) {
        isGetHonorCoin = getHonorCoin;
    }

    public boolean isCompleteGrowfund() {
        return isCompleteGrowfund;
    }

    public void setCompleteGrowfund(boolean completeGrowfund) {
        isCompleteGrowfund = completeGrowfund;
    }

    public String getShowGrowfund() {
        return showGrowfund;
    }

    public void setShowGrowfund(String showGrowfund) {
        this.showGrowfund = showGrowfund;
    }

    public String getGroupFundUrl() {
        return groupFundUrl;
    }

    public void setGroupFundUrl(String groupFundUrl) {
        this.groupFundUrl = groupFundUrl;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public boolean isUidBindWeiXin() {
        return isUidBindWeiXin;
    }

    public void setUidBindWeiXin(boolean uidBindWeiXin) {
        isUidBindWeiXin = uidBindWeiXin;
    }

    public String getAdorable() {
        return adorable;
    }

    public void setAdorable(String adorable) {
        this.adorable = adorable;
    }

    public boolean isMember() {
        return isMember;
    }

    public void setMember(boolean member) {
        isMember = member;
    }

    public String getUid() {
        return uid;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getSign() {
        return sign;
    }

    public void setSign(String sign) {
        this.sign = sign;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getFans() {
        return fans;
    }

    public void setFans(String fans) {
        this.fans = fans;
    }

    public String getConcern() {
        return concern;
    }

    public void setConcern(String concern) {
        this.concern = concern;
    }

    public int getLevel() {
        return level;
    }

    public void setLevel(int level) {
        this.level = level;
    }

    public String getCoin() {
        return coin;
    }

    public void setCoin(String coin) {
        this.coin = coin;
    }

    public String getShell() {
        return shell;
    }

    public void setShell(String shell) {
        this.shell = shell;
    }

    public String getCellphone() {
        return cellphone;
    }

    public void setCellphone(String cellphone) {
        this.cellphone = cellphone;
    }

    public String getXanchor() {
        return xanchor;
    }

    public void setXanchor(String xanchor) {
        this.xanchor = xanchor;
    }

    public int getUser_type() {
        return user_type;
    }

    public void setUser_type(int user_type) {
        this.user_type = user_type;
    }

    public String getAuthStatus() {
        return authStatus;
    }

    public void setAuthStatus(String authStatus) {
        this.authStatus = authStatus;
    }

    public String getAuthName() {
        return authName;
    }

    public void setAuthName(String authName) {
        this.authName = authName;
    }

    public String getFamilyname() {
        return familyname;
    }

    public void setFamilyname(String familyname) {
        this.familyname = familyname;
    }

    public boolean isNoBaseSalary() {
        return noBaseSalary;
    }

    public void setNoBaseSalary(boolean noBaseSalary) {
        this.noBaseSalary = noBaseSalary;
    }

    public FoundBean getFound() {
        return found;
    }

    public void setFound(FoundBean found) {
        this.found = found;
    }

    public String getGuard_tag() {
        return guard_tag;
    }

    public void setGuard_tag(String guard_tag) {
        this.guard_tag = guard_tag;
    }

    public boolean isIsUidBindWeiXin() {
        return isUidBindWeiXin;
    }

    public void setIsUidBindWeiXin(boolean isUidBindWeiXin) {
        this.isUidBindWeiXin = isUidBindWeiXin;
    }

    public String getOnline_status() {
        return online_status;
    }

    public void setOnline_status(String online_status) {
        this.online_status = online_status;
    }

    public VipBean getVip() {
        return vip;
    }

    public void setVip(VipBean vip) {
        this.vip = vip;
    }

    public String getOnuse() {
        return onuse;
    }

    public void setOnuse(String onuse) {
        this.onuse = onuse;
    }

    public MedalsBean getMedals() {
        return medals;
    }

    public void setMedals(MedalsBean medals) {
        this.medals = medals;
    }

    public List<String> getInvester() {
        return invester;
    }

    public void setInvester(List<String> invester) {
        this.invester = new ArrayList<>(invester);
    }

    public int getFreeAddressNumber() {
        return freeAddressNumber;
    }

    public void setFreeAddressNumber(int freeAddressNumber) {
        this.freeAddressNumber = freeAddressNumber;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public int getIsShowShop() {
        return isShowShop;
    }

    public void setIsShowShop(int isShowShop) {
        this.isShowShop = isShowShop;
    }

    public String getAnchorStatus() {
        return anchorStatus;
    }

    public void setAnchorStatus(String anchorStatus) {
        this.anchorStatus = anchorStatus;
    }

    public String getInit_time() {
        return init_time;
    }

    public void setInit_time(String init_time) {
        this.init_time = init_time;
    }

    public static class FoundBean implements Parcelable {
        /**
         * switch : false
         * icon : https://newstatic.qifanzhibo.com/default/user-avatar.png
         * title : 七果游戏
         * desc : 上古神器
         * img : https://newstatic.qifanzhibo.com/default/user-avatar.png
         * url : http://www.qiyuzhibo.com
         */

        @SerializedName("switch")
        private boolean switchX;
        private String icon;
        private String title;
        private String desc;
        private String img;
        private String url;

        protected FoundBean(Parcel in) {
            switchX = in.readByte() != 0;
            icon = in.readString();
            title = in.readString();
            desc = in.readString();
            img = in.readString();
            url = in.readString();
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeByte((byte) (switchX ? 1 : 0));
            dest.writeString(icon);
            dest.writeString(title);
            dest.writeString(desc);
            dest.writeString(img);
            dest.writeString(url);
        }

        @Override
        public int describeContents() {
            return 0;
        }

        public static final Creator<FoundBean> CREATOR = new Creator<FoundBean>() {
            @Override
            public FoundBean createFromParcel(Parcel in) {
                return new FoundBean(in);
            }

            @Override
            public FoundBean[] newArray(int size) {
                return new FoundBean[size];
            }
        };

        public boolean isSwitchX() {
            return switchX;
        }

        public void setSwitchX(boolean switchX) {
            this.switchX = switchX;
        }

        public String getIcon() {
            return icon;
        }

        public void setIcon(String icon) {
            this.icon = icon;
        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public String getDesc() {
            return desc;
        }

        public void setDesc(String desc) {
            this.desc = desc;
        }

        public String getImg() {
            return img;
        }

        public void setImg(String img) {
            this.img = img;
        }

        public String getUrl() {
            return url;
        }

        public void setUrl(String url) {
            this.url = url;
        }
    }

    public static class VipBean implements Parcelable {
        /**
         * level : 等级
         * img :  一个圆形的头衔，要覆盖在头像上的那种 例：侯爵
         * onimg : 矩形的一个贵族文字名称 例：侯爵
         */

        private String level;
        private String img;
        private String onimg;

        protected VipBean(Parcel in) {
            level = in.readString();
            img = in.readString();
            onimg = in.readString();
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(level);
            dest.writeString(img);
            dest.writeString(onimg);
        }

        @Override
        public int describeContents() {
            return 0;
        }

        public static final Creator<VipBean> CREATOR = new Creator<VipBean>() {
            @Override
            public VipBean createFromParcel(Parcel in) {
                return new VipBean(in);
            }

            @Override
            public VipBean[] newArray(int size) {
                return new VipBean[size];
            }
        };

        public String getLevel() {
            return level;
        }

        public void setLevel(String level) {
            this.level = level;
        }

        public String getImg() {
            return img;
        }

        public void setImg(String img) {
            this.img = img;
        }

        public String getOnimg() {
            return onimg;
        }

        public void setOnimg(String onimg) {
            this.onimg = onimg;
        }
    }

    public static class MedalsBean implements Parcelable {
        /**
         * 资深 官方 等
         * 头衔
         * img :在线列表图标  （覆盖在头像上的遮罩）
         * onimg : 公聊标签  （例子：资深 矩形文字）
         */

        private String img;
        private String onimg;

        protected MedalsBean(Parcel in) {
            img = in.readString();
            onimg = in.readString();
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(img);
            dest.writeString(onimg);
        }

        @Override
        public int describeContents() {
            return 0;
        }

        public static final Creator<MedalsBean> CREATOR = new Creator<MedalsBean>() {
            @Override
            public MedalsBean createFromParcel(Parcel in) {
                return new MedalsBean(in);
            }

            @Override
            public MedalsBean[] newArray(int size) {
                return new MedalsBean[size];
            }
        };

        public String getImg() {
            return img;
        }

        public void setImg(String img) {
            this.img = img;
        }

        public String getOnimg() {
            return onimg;
        }

        public void setOnimg(String onimg) {
            this.onimg = onimg;
        }
    }
}
